
package xj.app;

import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.io.*;
import javax.swing.*; 
import javax.imageio.*;

/**
 * An abstract class for short/transition animations 
 * All input will be blocked. 
 */
public class AnimationPane 
  extends JComponent {

  protected JFrame frame;

  static protected Robot robot = null;

  static { 
    try { 
      robot = new Robot();
    } catch (AWTException e) {
    }
  }

  public AnimationPane(JFrame frame) {
    this.frame = frame; 
  }

  protected void blockInput() {
    // blocks all user input
    addMouseListener(new MouseAdapter() { });
    addMouseMotionListener(new MouseMotionAdapter() { });
    addKeyListener(new KeyAdapter() { });
        
    setFocusTraversalKeysEnabled(false);
    addComponentListener(new ComponentAdapter() {
	public void componentShown(ComponentEvent evt) {
	  requestFocusInWindow();
	}
      });
    
  }

} 
